from Base import message, intersect, SS_VALID
from DRG import MDCO_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["72.0x00","72.1x00","72.2100","72.2900x001","72.3100","72.3900x001","72.4x00","72.5100x001","72.5200x001","72.5300","72.5400x001","72.6x00","72.7100x001","72.7900x001","72.8x00","73.2100x001","73.2200","73.3x00x001","73.5900x001","73.8x00x006","73.9100","73.9300","73.9400","73.9900"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合OC1入组条件，匹配规则：主手术匹配')

    if MDCO_DRG.OC11_group(record):
      return 'OC11'

    if MDCO_DRG.OC15_group(record):
      return 'OC15'
        
    return 'OC1'
  else:
    return ''
    
